import {
    request
} from './request'

const METHOD = {
    POST: 'POST',
    GET: 'GET',
    PUT: 'PUT',
    DELETE: 'DELETE'
}

export const BASE_URL = "https://xxx/ai-lawyer"

// 用户登录
export const login = (data,header) => {
    return request(METHOD.POST, data, BASE_URL + '/chat/login',header)
}

// 开始问答
export const chat = (data,header) => {
    return request(METHOD.GET, data, BASE_URL + '/chat/chat',header)
} 

// 查询聊天对话
export const getChatMemory = (data,header) => {
    return request(METHOD.GET, data, BASE_URL + '/chat/getChatMemory',header)
}

// 查询聊天会话
export const getChatConversation = (data,header) => {
    return request(METHOD.GET, data, BASE_URL + '/chat/getChatConversation',header)
}

// 删除聊天会话
export const deleteConversation = (data,header) => {
    return request(METHOD.GET, data, BASE_URL + '/chat/deleteConversation',header)
}

// 停止问答
export const stopAnswer = (data,header) => {
    return request(METHOD.GET, data, BASE_URL + '/chat/stopAnswer',header)
}
